<template>
  <div class="header">
    <el-button class="switch" type="primary" icon="el-icon-s-operation" @click="$emit('switch')"></el-button>
    <div class="exit" @click="exit()">
      <i class="fa fa-sign-in" aria-hidden="true"></i>&nbsp;<span><strong>退出</strong></span>
    </div>
  </div>
</template>

<script>
export default {
  name: "Header",
  methods: {
    exit() {
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="scss">
.header {
  width: 100%;
  height: 100%;
  background: #ffffff;

  .switch {
    position: relative;
    top: 20px;
    left: 10px;
    width: 40px;
    height: 30px;
    padding: 0px;
    background: #1ab394;
  }

  .exit {
    font-size: 14px;
    color: #999c9e;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 30px;
  }
}
</style>
